package cn.tedu.micro.demo.all.controller;

import cn.tedu.micro.demo.all.service.StockService;
import cn.tedu.micro.demo.common.result.JsonResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class StockController {
    @Autowired
    private StockService stockService;
    @PostMapping("/stock/update")
    public JsonResult updateStock(String productCode,Integer count){
        stockService.updateStock(productCode,count);
        return JsonResult.ok();
    }
}
